<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input id="text1" type="text"/>
<select id="select1">
    <option value="北京">北京</option>
    <option value="上海">上海</option>
    <option value="杭州">杭州</option>
 </select>
<input id="btn1" type="button" value="按钮"/>
<script type="text/javascript">
    (function () {
      var btn = document.getElementById("btn1");
      var text = document.getElementById("text1");
      var select = document.getElementById("select1");
      btn.addEventListener("click",function () {
          var textval       = text.value
          var selectval     = select.value
          alert(textval+selectval)
      })
    })

</script>
</body>
</html>